home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / tk3.6 / README < prev    next >
Encoding:
Text File  |  1995-07-14  |  11.3 KB  |  249 lines

  1. The Tk Toolkit
  2.  
  3. by John Ousterhout
  4. University of California at Berkeley
  5. ouster@cs.berkeley.edu
  6.  
  7. 1. Introduction
  8. ---------------
  9.  
  10. This directory contains the sources and documentation for Tk, an
  11. X11 toolkit that provides the Motif look and feel and is implemented
  12. using the Tcl scripting language.  The information here corresponds
  13. to Tk 3.6.  It is designed to work with Tcl 7.3 and may not work
  14. with other releases of Tcl.
  15.  
  16. 2. Documentation
  17. ----------------
  18.  
  19. The best way to get started with Tk is to read the draft of my upcoming
  20. book on Tcl and Tk, which can be retrieved using anonymous FTP from the
  21. directory "ucb/tcl" on ftp.cs.berkeley.edu.  Part II of the book provides
  22. an introduction to writing Tcl scripts for Tk and Part IV describes how
  23. to build new widgets and geometry managers in C using Tk's library
  24. procedures.
  25.  
  26. The "doc" subdirectory in this release contains a complete set of manual
  27. entries for Tk.  Files with extension ".1" are for programs such as
  28. wish; files with extension ".3" are for C library procedures; and files
  29. with extension ".n" describe Tcl commands.  To print any of the manual
  30. entries, cd to the "doc" directory and invoke your favorite variant of
  31. troff using the normal -man macros, for example
  32.  
  33.         ditroff -man wish.1
  34.  
  35. to print wish.1.  If Tk has been installed correctly and your "man"
  36. program supports it, you should be able to access the Tcl manual entries
  37. using the normal "man" mechanisms, such as
  38.  
  39.         man wish
  40.  
  41. 3. Compiling and installing Tk
  42. ------------------------------
  43.  
  44. This release should compile and run with little or no effort on any
  45. UNIX-like system that approximates POSIX, BSD, or System V and runs
  46. the X Window System.  I know that it runs on workstations from Sun,
  47. DEC, H-P, IBM, and Silicon Graphics, and on PC's running SCO UNIX
  48. and Xenix.  To compile Tk, do the following:
  49.  
  50.     (a) Make sure that this directory and the corresponding release of
  51.         Tcl are both subdirectories of the same directory.  This
  52.     directory should be named tk3.6 and the Tcl release directory
  53.     should be named tcl7.3.
  54.  
  55.     (b) Type "./configure" in this directory.  This runs a configuration
  56.     script created by GNU autoconf, which configures Tcl for your
  57.     system and creates a Makefile.  The configure script allows you
  58.     to customize the Tk configuration for your site;  for details on
  59.     how you can do this, see the file "configure.info".
  60.  
  61.     (c) Type "make".  This will create a library archive called "libtk.a"
  62.     and an interpreter application called "wish" that allows you to type
  63.     Tcl commands interactively or execute script files.
  64.  
  65.     (d) If the make fails then you'll have to personalize the Makefile
  66.         for your site or possibly modify the distribution in other ways.
  67.     First check the file "porting.notes" to see if there are hints
  68.     for compiling on your system.  If you need to modify Makefile,
  69.     there are comments at the beginning of it that describe the things
  70.     you might want to change and how to change them.
  71.     
  72.     (e) Type "make install" to install Tk's binaries and script files in
  73.         standard places.  In the default configuration information will
  74.     be installed in /usr/local so you'll need write permission on
  75.     this directory.
  76.  
  77.     (f) At this point you can play with Tcl by invoking the "wish"
  78.     program and typing Tcl commands.  However, if you haven't installed
  79.     Tk then you'll first need to set your TK_LIBRARY environment
  80.     variable to hold the full path name of the "library" subdirectory.
  81.     If you haven't installed Tcl either then you'll need to set your
  82.     TCL_LIBRARY environment variable as well (see the Tcl README file
  83.     for information on this).
  84.  
  85. If you have trouble compiling Tk, I'd suggest looking at the file
  86. "porting.notes".  It contains information that people have sent me about
  87. changes they had to make to compile Tcl in various environments.  I make
  88. no guarantees that this information is accurate, complete, or up-to-date,
  89. but you may find it useful.  If you get Tk running on a new configuration
  90. and had to make non-trivial changes to do it, I'd be happy to receive new
  91. information to add to "porting.notes".  I'm also interested in hearing
  92. how to change the configuration setup so that Tcl compiles on additional
  93. platforms "out of the box".
  94.  
  95. 4. Test suite
  96. -------------
  97.  
  98. Tk now has the beginnings of a self-test suite, consisting of a set of
  99. scripts in the subdirectory "tests".  To run the test suite just type
  100. "make test" in this directory.  You should then see a printout of the
  101. test files processed.  If any errors occur, you'll see a much more
  102. substantial printout for each error.  See the README file in the
  103. "tests" directory for more information on the test suite.
  104.  
  105. 5. Getting started
  106. ------------------
  107.  
  108. Once wish is compiled you can use it to play around with the Tk
  109. facilities.  If you run wish with no arguments, it will open a small
  110. window on the screen and read Tcl commands from standard input.
  111. Or, you can play with some of the pre-canned scripts in the subdirectory
  112. library/demos.  See the README file in the directory for a description
  113. of what's available.  The file library/demos/widget is a script that
  114. you can use to invoke many individual demonstrations of Tk's facilities.
  115.  
  116. If you want to start typing Tcl/Tk commands to wish, I'd suggest
  117. starting with a widget-creation command like "button", and also learn
  118. about the "pack" and "place" commands for geometry management.  Note:
  119. when you create a widget, it won't appear on the screen until you tell
  120. a geometry manager about it.  The only geometry managers at present
  121. are the packer and the placer.  If you don't already know Tcl, read the
  122. Tcl book excerpt that can be FTP'ed separately from the distribution
  123. directory.
  124.  
  125. Andrew Payne has written a very nice demo script called "The Widget Tour"
  126. that introduces you to writing Tk scripts.  This script is available
  127. from the Tcl contributed archive described below.  If you're just
  128. getting started with Tk I strongly recommend trying out the widget tour.
  129.  
  130. 6. Summary of changes in recent releases
  131. ----------------------------------------
  132.  
  133. Tk 3.6 is a minor new release that is identical to 3.4 except that it
  134. fixes a portability bug that prevents tkMain.c from compiling on some
  135. machines (R_OK isn't properly defined).  Tk 3.6 should be completely
  136. compatible with both 3.4 and 3.3.
  137.  
  138. Tk 3.5 was mistake, and was withdrawn shortly after it was released.
  139.  
  140. Tk 3.4 is a minor release consisting almost entirely of bug fixes.  There
  141. are no significant feature changes and Tk 3.4 should be completely
  142. compatible with Tk 3.3.
  143.  
  144. Tk 3.3 consists mostly of bug fixes plus upgrades to make it compatible
  145. with Tcl 7.0.  It should not introduce any compatibility problems itself,
  146. but it requires Tcl 7.0, which introduces several incompatibilities
  147. (see the Tcl README file for details).  The file "changes" contains a
  148. complete list of all changes to Tk, including both bug fixes and new
  149. features.  Here is a short list of a few of the most significant new
  150. features:
  151.  
  152.     1. Tk is now consistent with the book drafts.  This means that the
  153.     new packer syntax has been implemented and additional bitmaps and
  154.     reliefs are available.
  155.  
  156.     2. Tk now supports stacking order.  Windows will stack in the order
  157.     created, and "raise" and "lower" commands are available to change
  158.     the stacking order.
  159.  
  160.     3. There have been several improvements in configuration:  GNU
  161.     autoconf is now used for configuration;  wish now supports the
  162.     Tcl_AppInit procedure;  and there's a patchlevel.h file that will
  163.     be used for future patches.  The Tk release no longer includes a
  164.     Tcl release; you'll have to retrieve Tcl separately.
  165.  
  166.     4. The Tk script library contains a new procedure "tk_dialog" for
  167.     creating dialog boxes, and the default "tkerror" has been improved
  168.     to use tk_dialog.
  169.  
  170.     5. Tk now provides its own "exit" command that cleans up properly,
  171.     so it's now safe to use "exit" instead of "destroy ." to end wish
  172.     applications.
  173.  
  174.     6. Cascade menu entries now display proper Motif arrows.
  175.  
  176.     7. The main window is now a legitimate toplevel widget.
  177.  
  178.     8. Wish allows prompts to be user-settable via the "tcl_prompt1"
  179.     and "tcl_prompt2" variables.
  180.  
  181. 7. Tcl/Tk newsgroup
  182. -------------------
  183.  
  184. There is a network news group "comp.lang.tcl" intended for the exchange
  185. of information about Tcl, Tk, and related applications.  Feel free to use
  186. this newsgroup both for general information questions and for bug reports.
  187. I read the newsgroup and will attempt to fix bugs and problems reported
  188. to it.
  189.  
  190. 8. Tcl/Tk contributed archive
  191. --------------------------
  192.  
  193. Many people have created exciting packages and applications based on Tcl
  194. and/or Tk and made them freely available to the Tcl community.  An archive
  195. of these contributions is kept on the machine harbor.ecn.purdue.edu.  You
  196. can access the archive using anonymous FTP;  the Tcl contributed archive is
  197. in the directory "pub/tcl".
  198.  
  199. 9. Support and bug fixes
  200. ------------------------
  201.  
  202. I'm very interested in receiving bug reports and suggestions for
  203. improvements.  Bugs usually get fixed quickly (particularly if they
  204. are serious), but enhancements may take a while and may not happen at
  205. all unless there is widespread support for them (I'm trying to slow
  206. the rate at which Tk turns into a kitchen sink).  It's becoming
  207. increasingly difficult to make incompatible changes to Tk, but it's
  208. not totally out of the question.
  209.  
  210. The Tcl/Tk community is too large for me to provide much individual
  211. support for users.  If you need help I suggest that you post questions
  212. to comp.lang.tcl.  I read the newsgroup and will attempt to answer
  213. esoteric questions for which no-one else is likely to know the answer.
  214. In addition, Tcl/Tk support and training are available commercially from
  215. NeoSoft.  For more information, send e-mail to "info@neosoft.com".
  216.  
  217.  
  218. 10. Release organization
  219. ---------------------------
  220.  
  221. Each Tk release is identified by two numbers separated by a dot, e.g.
  222. 3.2 or 3.3.  If a new release contains changes that are likely to break
  223. existing C code or Tcl scripts then the major release number increments
  224. and the minor number resets to zero: 3.0, 4.0, etc.  If a new release
  225. contains only bug fixes and compatible changes, then the minor number
  226. increments without changing the major number, e.g. 3.1, 3.2, etc.  If
  227. you have C code or Tcl scripts that work with release X.Y, then they
  228. should also work with any release X.Z as long as Z > Y.
  229.  
  230. Beta releases have an additional suffix of the form bx.  For example,
  231. Tk 3.3b1 is the first beta release of Tk version 3.3, Tk 3.3b2 is
  232. the second beta release, and so on.  A beta release is an initial
  233. version of a new release, used to fix bugs and bad features before
  234. declaring the release stable.  Each new release will be preceded by
  235. one or more beta releases.  I hope that lots of people will try out
  236. the beta releases and report problems back to me.  I'll make new beta
  237. releases to fix the problems, until eventually there is a beta release
  238. that appears to be stable.  Once this occurs I'll remove the beta
  239. suffix so that the last beta release becomes the official release.
  240.  
  241. If a new release contains incompatibilities (e.g. 4.0) then I can't
  242. promise to maintain compatibility among its beta releases.  For example,
  243. release 4.0b2 may not be backward compatible with 4.0b1.  I'll try
  244. to minimize incompatibilities between beta releases, but if a major
  245. problem turns up then I'll fix it even if it introduces an
  246. incompatibility.  Once the official release is made then there won't
  247. be any more incompatibilities until the next release with a new major
  248. version number.
  249.